<template>
</template>

<script>

var yj = {
  getQueryString: function(name) {
    if(window.location.search) { //判断是否hash模式
                var parameter = window.location.search;
            } else {
                var parameter = "?" + window.location.hash.slice(2).split("?")[1];
        
            }
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = parameter.substr(1).match(reg);
            if(r != null) {
                return decodeURI(r[2]);
            } else {
                return null;
            }
  }
};
//乘
const accMul = function(arg1, arg2) {
    var m = 0, 
    s1 = arg1.toString(), 
    s2 = arg2.toString();
    try {
        m += s1.split(".")[1].length
    } catch (e) {
    }
    try {
        m += s2.split(".")[1].length
    } catch (e) {
    }
    return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
}
  const timeData = function(val){
    var hh =""; //小时
    var mm="";//分钟
    var hs="";//小时毫秒数
    var ms="";//分钟毫秒数
    
    this.data = val;
    this.arr = this.data.split(":");
    hh =this.arr[0]*1;
    mm =this.arr[1]*1;
    // console.log(mm)
    // console.log(hh)
    hs = hh*60*60*1000;
    ms = mm*60*1000;
    return hs+ms;
  }
// const merchantId = yj.getQueryString("merchantId");
// const institutionId = yj.getQueryString("institutionId");
// const appId = yj.getQueryString("appId");
// const token = yj.getQueryString("token");
const id = yj.getQueryString("id");
const platformId = yj.getQueryString("platformId");
const terminal = yj.getQueryString("terminal"); //Android  iOS

const ip = '';
const city = '';
const mccname = {
      恩施土家族苗族自治州:'27.28.145.200',
      文山壮族苗族自治州:'222.219.234.15',
      北京市:'1.119.203.255',
      阿克苏地区:"49.116.63.255",
      阿拉善盟: "1.24.183.255",
      阿勒泰地区: "49.119.31.255",
      阿里地区: "202.98.253.72",
      安康市: "1.82.52.255",
      安庆市: "36.6.223.255",
      安顺市: "1.48.44.255",
      安阳市: "1.194.235.255",
      鞍山市: "36.4.248.255",
      巴彦淖尔市: "1.24.113.255",
      巴中市: "61.139.57.255",
      白城市: "36.97.63.255",
      白山市: "61.138.156.134",
      白银市: "27.224.131.255",
      百色市: "61.139.195.255",
      蚌埠市: "36.4.167.255",
      包头市: "1.24.135.255",
      宝鸡市: "36.42.32.255",
      保定市: "27.129.133.255",
      保山市: "14.204.215.255",
      北海市: "61.139.239.255",
      本溪市: "42.85.127.255",
      毕节地区: "1.205.203.255",
      滨州市: "27.195.17.255",
      博尔塔拉蒙古自治州: "123.80.31.255",
      沧州市: "27.128.175.255",
      昌都地区: "202.98.228.11",
      长春市: "36.48.14.255",
      长沙市: "42.48.62.255",
      长治市: "59.48.47.5",
      常德市: "58.47.27.13",
      常州市: "49.80.34.255",
      巢湖市: "36.33.233.255",
      朝阳市: "42.52.127.255",
      潮州市: "14.18.139.255",
      郴州市: "42.48.123.255",
      成都市: "60.255.2.255",
      承德市: "61.55.123.255",
      池州市: "36.59.224.255",
      赤峰市: "1.26.105.255",
      崇左市: "106.127.149.255",
      滁州市: "36.6.31.255",
      达州市: "61.139.56.255",
      大连市: "42.84.0.255",
      大庆市: "1.59.46.255",
      大同市: "59.48.8.182",
      大兴安岭地区: "1.63.85.255",
      丹东市: "42.52.15.255",
      德阳市: "61.139.30.249",
      德州市: "27.207.140.255",
      定西市: "27.224.15.255",
      东莞市: "14.119.63.255",
      东营市: "27.202.191.255",
      鄂尔多斯市: "1.24.31.255",
      鄂州市: "27.25.255.255",
      防城港市: "61.241.183.255",
      佛山市: "14.17.113.255",
      福州市: "27.148.147.255",
      抚顺市: "42.203.31.255",
      抚州市: "39.167.191.255",
      阜新市: "42.52.63.255",
      阜阳市: "36.5.15.255",
      甘南州: "27.224.80.255",
      赣州市: "39.166.127.255",
      固原市: "14.134.184.255",
      广安市: "61.139.59.110",
      广元市: "61.139.58.255",
      广州市: "1.185.191.255",
      贵港市: "58.59.184.4",
      贵阳市: "1.48.43.255",
      桂林市: "61.139.194.255",
      哈尔滨市: "1.56.97.255",
      哈密地区: "49.114.47.255",
      海东地区: "223.221.31.255",
      // 海口市: "36.1.46.255",
      邯郸市: "27.128.214.255",
      汉中市: "1.81.160.255",
      杭州市: "36.18.255.255",
      合肥市: "36.4.11.255",
      和田地区: "49.114.31.255",
      河池市: "61.139.250.255",
      河源市: "14.159.191.255",
      菏泽市: "27.206.8.255",
      贺州市: "58.59.179.255",
      鹤壁市: "1.197.1.255",
      鹤岗市: "1.56.63.255",
      黑河市: "1.60.41.255",
      衡水市: "27.129.58.255",
      衡阳市: "42.49.231.255",
      呼和浩特市: "1.24.215.255",
      呼伦贝尔市: "1.26.28.255",
      湖州市: "60.12.96.128",
      葫芦岛市: "42.52.239.255",
      怀化市: "42.48.94.255",
      淮安市: "49.71.63.255",
      淮北市: "36.33.79.255",
      淮南市: "36.6.47.255",
      黄冈市: "27.23.132.255",
      黄山市: "36.6.63.255",
      黄石市: "27.24.8.68",
      惠州市: "14.21.191.255",
      鸡西市: "1.57.194.255",
      吉安市: "58.17.82.255",
      吉林市: "36.48.146.255",
      济南市: "27.211.64.255",
      济宁市: "27.198.11.255",
      佳木斯市: "1.59.170.255",
      嘉兴市: "36.17.191.255",
      嘉峪关市: "27.224.239.255",
      江门市: "14.18.127.255",
      焦作市: "1.195.74.255",
      揭阳市: "14.125.255.255",
      金昌市: "27.224.197.255",
      金华市: "36.16.255.255",
      锦州市: "42.59.160.255",
      晋城市: "59.48.173.255",
      晋中市: "59.48.96.255",
      荆门市: "27.25.121.255",
      荆州市: "27.20.35.255",
      景德镇市: "58.17.55.255",
      九江市: "58.17.121.139",
      酒泉市: "27.224.231.255",
      喀什地区: "49.114.191.255",
      开封市: "1.193.114.255",
      克拉玛依市: "36.105.127.255",
      昆明市: "14.204.64.255",
      拉萨市: "27.98.233.255",
      来宾市: "110.72.231.255",
      莱芜市: "27.204.63.255",
      兰州市: "27.224.146.255",
      廊坊市: "27.189.45.255",
      乐山市: "61.139.52.51",
      丽江市: "60.161.195.1",
      丽水市: "36.16.130.255",
      连云港市: "49.82.191.255",
      辽阳市: "42.52.183.255",
      辽源市: "36.49.115.255",
      聊城市: "27.196.20.255",
      林芝地区: "113.63.189.255",
      临沧市: "14.204.95.255",
      临汾市: "59.48.116.17",
      临夏州: "27.224.95.255",
      临沂市: "27.197.2.255",
      柳州市: "58.59.131.255",
      六安市: "36.6.255.255",
      六盘水市: "1.206.1.255",
      龙岩市: "27.158.191.255",
      陇南市: "27.224.65.255",
      娄底市: "42.49.43.255",
      泸州市: "61.139.39.72",
      吕梁市: "59.48.236.255",
      洛阳市: "1.193.244.255",
      漯河市: "1.197.49.255",
      马鞍山市: "36.4.248.255",
      茂名市: "14.113.255.255",
      眉山市: "61.139.60.153",
      梅州市: "14.125.175.255",
      绵阳市: "61.139.33.118",
      牡丹江市: "1.56.226.255",
      内江市: "61.139.46.115",
      那曲地区: "113.63.123.255",
      南昌市: "36.192.203.255",
      南充市: "61.139.38.255",
      南京市: "42.246.255.255",
      南宁市: "58.59.132.225",
      南平市: "27.150.37.255",
      南通市: "36.149.35.255",
      南阳市: "1.196.129.255",
      宁波市: "36.16.63.255",
      宁德市: "27.150.98.255",
      攀枝花市: "61.139.42.53",
      盘锦市: "42.58.255.255",
      平顶山市: "1.194.27.255",
      平凉市: "27.224.145.255",
      萍乡市: "58.17.58.36",
      莆田市: "27.150.204.255",
      濮阳市: "1.195.128.255",
      普洱市: "61.166.72.255",
      七台河市: "1.60.127.255",
      齐齐哈尔市: "1.57.82.255",
      钦州市: "61.139.246.255",
      秦皇岛市: "60.7.2.81",
      青岛市: "27.193.10.255",
      清远市: "14.122.255.255",
      庆阳市: "27.225.159.255",
      曲靖市: "14.204.167.255",
      衢州市: "59.79.151.255",
      泉州市: "27.152.45.255",
      日喀则地区: "27.98.235.255",
      日照市: "39.72.40.255",
      三门峡市: "1.195.111.255",
      三明市: "27.150.95.255",
      三亚市: "59.49.160.255",
      山南地区: "124.31.107.255",
      汕头市: "14.125.3.255",
      汕尾市: "14.159.235.255",
      商洛市: "1.82.31.255",
      商丘市: "1.196.77.255",
      上饶市: "58.17.35.255",
      韶关市: "14.144.63.255",
      邵阳市: "42.48.172.255",
      绍兴市: "60.12.84.181",
      深圳市: "14.20.127.255",
      沈阳市: "1.180.236.255",
      十堰市: "27.25.128.255",
      石家庄市: "27.128.191.255",
      石嘴山市: "14.134.102.255",
      双鸭山市: "1.57.191.255",
      朔州市: "59.48.207.1",
      四平市: "58.244.182.255",
      松原市: "36.49.239.255",
      苏州市: "36.149.15.255",
      宿迁市: "49.70.18.255",
      宿州市: "36.7.239.255",
      绥化市: "1.57.0.255",
      随州市: "58.19.170.255",
      遂宁市: "61.139.55.255",
      塔城地区: "49.117.95.255",
      台州市: "36.19.31.255",
      太原市: "1.68.31.255",
      泰安市: "27.200.47.255",
      泰州市: "49.71.187.255",
      唐山市: "27.128.127.255",
      天水市: "27.224.20.255",
      铁岭市: "42.52.31.255",
      通化市: "61.138.155.255",
      通辽市: "1.26.255.255",
      铜川市: "61.134.54.129",
      铜陵市: "36.7.223.255",
      吐鲁番地区: "223.114.239.255",
      威海市: "27.203.51.255",
      潍坊市: "27.192.11.255",
      渭南市: "1.81.86.255",
      温州市: "36.22.109.255",
      乌海市: "1.24.159.255",
      乌兰察布市: "1.24.39.255",
      乌鲁木齐市: "36.109.127.255",
      无锡市: "45.124.83.255",
      吴忠市: "14.134.128.255",
      芜湖市: "36.4.78.255",
      梧州市: "61.139.231.255",
      武汉市: "27.16.124.255",
      武威市: "27.224.203.255",
      西安市: "1.80.155.255",
      西宁市: "36.100.191.255",
      锡林郭勒盟: "1.24.15.255",
      厦门市: "27.150.159.255",
      咸宁市: "27.24.159.255",
      咸阳市: "1.86.125.255",
      湘潭市: "42.49.104.255",
      襄樊市: "123.85.17.255",
      孝感市: "27.23.10.255",
      忻州市: "59.48.56.255",
      新乡市: "1.195.30.255",
      新余市: "58.17.66.255",
      信阳市: "1.196.197.255",
      兴安盟: "1.26.210.255",
      邢台市: "27.129.255.255",
      徐州市: "42.244.79.255",
      许昌市: "1.196.31.255",
      宣城市: "36.32.230.255",
      雅安市: "61.139.52.137",
      烟台市: "27.194.14.255",
      延安市: "36.43.11.255",
      盐城市: "49.69.199.255",
      扬州市: "49.71.69.255",
      阳江市: "14.113.79.255",
      阳泉市: "59.48.210.74",
      伊春市: "1.60.159.255",
      宜宾市: "61.139.49.255",
      宜昌市: "27.21.48.255",
      宜春市: "39.166.255.255",
      益阳市: "58.20.241.115",
      银川市: "14.134.209.255",
      鹰潭市: "58.17.90.255",
      营口市: "42.85.212.255",
      永州市: "61.137.122.255",
      榆林市: "1.82.127.255",
      玉林市: "58.59.176.228",
      玉溪市: "14.205.59.255",
      岳阳市: "42.48.255.255",
      云浮市: "14.28.127.255",
      运城市: "1.69.191.255",
      枣庄市: "39.90.163.255",
      湛江市: "14.119.255.255",
      张家界市: "58.44.220.255",
      张家口市: "60.8.0.29",
      张掖市: "27.225.171.255",
      漳州市: "27.155.13.255",
      昭通市: "14.204.199.255",
      肇庆市: "14.28.63.255",
      镇江市: "49.70.146.255",
      郑州市: "1.192.156.255",
      中山市: "14.18.7.255",
      中卫市: "14.134.220.255",
      舟山市: "60.185.149.255",
      周口市: "1.194.107.255",
      株洲市: "42.48.171.255",
      珠海市: "14.116.127.255",
      驻马店市: "1.194.127.255",
      资阳市: "61.188.215.255",
      淄博市: "27.195.70.255",
      自贡市: "61.139.44.115",
      遵义市: "1.205.25.255",
      天津市:'27.0.135.255',
      上海市:'27.109.127.255',
      襄阳市:'27.22.6.255',
      亳州市:'36.6.15.255',
      儋州市:'59.49.232.156',
      重庆市:'14.104.47.219',
      毕节市:'111.85.6.255',
      日喀则市:'202.98.234.109',
      海东市:'61.133.234.105',
      吐鲁番市:'49.114.15.255',
      哈密市:'60.13.147.255',
      额尔古纳市:'116.117.131.255'
  };
var aisleMerId='';


export default {
  ip,
  city,
  accMul,
  // merchantId,
  // institutionId,
  // appId,
  // token,
  aisleMerId,
  mccname,
  terminal,
  // id:'183',  //用户id
  // platformId:'22',//分公司id
  id,
  platformId,
  // host:'https://community.1818pay.cn/yj-epos',

  // host:'https://community.1818pay.cn/test-epos',

    // host:'http://192.168.1.187/yj-epos', //测试环境
     //  host:'http://192.168.1.181:8035', //测试环境
  host:'https://community.1818pay.cn/yj-epos', //正式环境
  pw:'',
  payUrl:'',
  queren:null,
  orderNo:null,  //订单号
  timeData,
  
};
</script>

<style>
body {
  background-color: #f1f1f1;
}
</style>